/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved. distributed with this file and
 * available online at
 */
package com.lap.auth.domain.project;

import com.lap.auth.domain.project.valueobject.ProjectType;
import com.lap.auth.domain.project.valueobject.StatusType;
import com.lap.framework.ddd.AggregateRoot;
import lombok.Getter;

/**
 * 项目领域。
 *
 * @author Shuisheng Lao(劳水生)
 * @version 0.0.1
 */
@Getter
public class Project extends AggregateRoot {

  private final Integer id;
  private final String name;
  private final String context;
  private final ProjectType type;
  private final StatusType status;
  private final Integer version;

  public Project(
      Integer id,
      String name,
      String context,
      ProjectType type,
      StatusType status,
      Integer version) {
    this.id = id;
    this.name = name;
    this.context = context;
    this.type = type;
    this.status = status;
    this.version = version;
  }

  public boolean isNew() {
    return (id == null);
  }
}
